package packVistas;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;

public class MenuAdmin extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 665412033968764799L;
	private final JPanel contentPanel = new JPanel();

	public MenuAdmin() {
		setTitle("Menu Admin");
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setResizable(false);
		setBounds(100, 100, 205, 183);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		
		JButton btnGestionarSistema = new JButton("Gestionar Sistema");
		btnGestionarSistema.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				GestionDelSistema gs = new GestionDelSistema();
				gs.setVisible(true);
			}
		});
		contentPanel.setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("170px:grow"),
				FormFactory.RELATED_GAP_COLSPEC,},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.MIN_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.MIN_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.MIN_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.MIN_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,}));
		contentPanel.add(btnGestionarSistema, "2, 2, fill, fill");
		
		JButton btnConfigurarTemporada = new JButton("Configurar Temporada");
		btnConfigurarTemporada.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ConfigurarTemporada ct = new ConfigurarTemporada();
				ct.setVisible(true);
			}
		});
		contentPanel.add(btnConfigurarTemporada, "2, 4, fill, fill");
		
		JButton btnConsultarDatosLiga = new JButton("Consultar Datos de la Liga");
		contentPanel.add(btnConsultarDatosLiga, "2, 6, fill, fill");
		
		JButton btnSalir = new JButton("Cerrar");
		btnSalir.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});
		contentPanel.add(btnSalir, "2, 10, fill, fill");
	}
}
